import { Component, OnInit } from '@angular/core';
import { BladeService } from "../../../../shared/blade.service";
import { BladeData } from "app/shared/blade/blade-data";
import { Observable } from "rxjs/Observable";
import { RolePermissionListComponent } from "../role-permission/role-permission-list/role-permission-list.component";
// import { RolePermissionListComponent } from "../permission/permission-list/permission-list.component";
// import { PermissionListComponent } from "../permission/permission-list/permission-list.component";

@Component({
  selector: 'app-role-permission',
  templateUrl: './role-permission.component.html',
  styleUrls: ['./role-permission.component.css']
})
export class RolePermissionComponent implements OnInit {

  constructor(public bladeService: BladeService) { }
  
    ngOnInit() {
      this.createRolePermissionListBlade()
    }

    createRolePermissionListBlade() {
      let data: BladeData = new BladeData();
      data.id = "RolePermissionList";
      data.title = "操作权限";   
      data.subtitle = "操作权限列表"; 
      data.isClosingDisabled = true;
      let rolePermissionListBlade = this.bladeService.createBlade(RolePermissionListComponent, data);
      this.bladeService.showBlade(rolePermissionListBlade);
    }


    canDeactivate(): boolean | Observable<boolean> | Promise<boolean> {
      return true;
    }
}



// WEBPACK FOOTER //
// ./src/app/module/admin/role/role-permission/role-permission.component.ts